<?php
	
	include "../dao/DeviceDAO.php";
	include "../dao/DriverDAO.php";
	include "../dao/ApnDAO.php";
	include "../dao/ModelDAO.php";
	include "../dao/PackageDAO.php";
	include "../dao/UsuarioDAO.php";
	include "../dao/PontoDAO.php";
	include "../dao/SimCardDAO.php";
	
	$devicedao = new DeviceDAO();
	$driverdao = new DriverDAO();
	$apndao = new ApnDAO();
	$modeldao = new ModelDAO();
	$packagedao = new PackageDAO();
	$usuariodao = new UsuarioDAO();
	$pontodao = new PontoDAO();
	$simcard = new SimCardDAO();
	
	if(isset($_GET['idDevice'])){
		$devicedao->delete($_GET['idDevice']);
	}else if(isset($_GET['idDriver'])){
		$driverdao->delete($_GET['idDriver']);
	}else if(isset($_GET['idApn'])){
		$apndao->delete($_GET['idApn']);
	}else if(isset($_GET['idModel'])){
		$modeldao->delete($_GET['idModel']);
	}else if(isset($_GET['idPackage'])){
		$packagedao->delete($_GET['idPackage']);
	}else if(isset($_GET['idUsuario']) && !isset($_GET['idPonto'])){
		$usuariodao->delete($_GET['idUsuario']);
	}else if(isset($_GET['idPonto'])){
		$pontodao->delete($_GET['idPonto'],$_GET["idUsuario"]);
	}else if(isset($_GET['idSimCard'])){
		$simcard->delete($_GET['idSimCard']);
	}
	
?>